<?php
return [
    //客户的
    'raw' => [
        'app_id' => 'wxd28c8eda0f4fa91b',//app_id
        'app_secret' => '3383aa14b6f7b751e82cfa0274a698b4',//秘钥
    ],
    //七牛云图片域名
    'host' => 'http://liaogeqiu01.cmdfut.com/',
    //分页
    'limit' => 10,
    //微信授权登录
    'user' => [
        'rule' => [
            'code' => 'require',
        ],
        'msg'  => [
            'code.require' => 'code不能为空',
        ],
    ],
    //分享获得球币
    'share' => [
        'rule' => [
            'share_member_id' => 'require|number',
        ],
        'msg'  => [
            'share_member_id.require' => '分享人id不能为空',
            'share_member_id.number'  => '分享人id必须为数字',
        ],
    ],
    //手机号登录
    'mobile_login' => [
        'rule' => [
            'mobile'      => 'require|regex:/^1[3-8]{1}[0-9]{9}$/',
            'mobile_code' => 'require|number',
        ],
        'msg'  => [
            'mobile.require'      => '手机号不能为空',
            'mobile'              => '手机号格式不正确',
            'mobile_code.require' => '验证码不能为空',
            'mobile_code.number'  => '验证码必须是数字',
        ],
    ],
    //分页
    'page' => [
        'rule' => [
            'page'              => 'require|number',
        ],
        'msg'  => [
            'page.require'              => '分页页码不能为空',
            'page.number'               => '分页页码必须是数字',
        ],
    ],
    //视频轮播列表
    'video_rotation_list' => [
        'rule' => [
            'video_category_id' => 'require|number',
        ],
        'msg'  => [
            'video_category_id.require' => '视频分类id不能为空',
            'video_category_id.number'  => '视频分类id必须是数字',
        ],
    ],
    //视频列表
    'video_list' => [
        'rule' => [
            'video_category_id' => 'require|number',
            'page'              => 'require|number',
        ],
        'msg'  => [
            'video_category_id.require' => '视频分类id不能为空',
            'video_category_id.number'  => '视频分类id必须是数字',
            'page.require'              => '分页页码不能为空',
            'page.number'               => '分页页码必须是数字',
        ],
    ],
    //视频收藏
    'video_collection' => [
        'rule' => [
            'video_id'   => 'require|number',
        ],
        'msg'  => [
            'video_id.require' => '视频id不能为空',
            'video_id.number'  => '视频id必须是数字',
        ],
    ],
    //活动详情
    'activity_detail' => [
        'rule' => [
            'activity_id'   => 'require|number',
        ],
        'msg'  => [
            'activity_id.require' => '活动id不能为空',
            'activity_id.number'  => '活动id必须是数字',
        ],
    ],
    //商品列表
    'goods_list' => [
        'rule' => [
            'shop_id'       => 'require|number',
            'page'          => 'require|number',
        ],
        'msg'  => [
            'shop_id.require'     => '商品分类id不能为空',
            'shop_id.number'      => '商品分类id必须是数字',
            'page.require'        => '分页页码不能为空',
            'page.number'         => '分页页码必须是数字',
        ],
    ],
    //商品详情
    'goods_detail' => [
        'rule' => [
            'goods_id'       => 'require|number',
        ],
        'msg'  => [
            'goods_id.require'     => '商品id不能为空',
            'goods_id.number'      => '商品id必须是数字',
        ],
    ],
    //几级规格组
    'level_specs' => [
        'rule' => [
            'goods_id'       => 'require|number',
            'attr_id'        => 'require|number',
            'level'          => 'require|number',
        ],
        'msg'  => [
            'goods_id.require'     => '商品id不能为空',
            'goods_id.number'      => '商品id必须是数字',
            'attr_id.require'      => '规格属性id不能为空',
            'attr_id.number'       => '规格属性id必须是数字',
            'level.require'        => '规格等级不能为空',
            'level.number'         => '规格等级必须是数字',
        ],
    ],
    //商品下单
    'submit_order' => [
        'rule' => [
            'goods_id'       => 'require|number',
            'num'            => 'require|number',
        ],
        'msg'  => [
            'goods_id.require'     => '商品id不能为空',
            'goods_id.number'      => '商品id必须是数字',
            'num.require'          => '兑换数量不能为空',
            'num.number'           => '兑换数量必须是数字',
        ],
    ],
    //商品确认订单
    'confirm_order' => [
        'rule' => [
            'goods_id'       => 'require|number',
            'num'            => 'require|number',
        ],
        'msg'  => [
            'goods_id.require'     => '商品id不能为空',
            'goods_id.number'      => '商品id必须是数字',
            'num.require'          => '兑换数量不能为空',
            'num.number'           => '兑换数量必须是数字',
        ],
    ],
    //我的订单列表
    'my_order_list' => [
        'rule' => [
            'status'          => 'require',
            'page'            => 'require|number',
        ],
        'msg'  => [
            'status.require'     => '订单状态不能为空',
            'page.require'       => '分页页码不能为空',
            'page.number'        => '分页页码必须是数字',
        ],
    ],
    //我的订单详情
    'my_order_detail' => [
        'rule' => [
            'order_id'            => 'require|number',
        ],
        'msg'  => [
            'order_id.require'       => '订单id不能为空',
            'order_id.number'        => '订单id必须是数字',
        ],
    ],
    //点赞或收藏
    'praise' => [
        'rule' => [
            'relation_id'     => 'require|number',
            'type'            => 'require|number',
            'relation_type'   => 'require|number',
        ],
        'msg'  => [
            'relation_id.require'       => '关联id不能为空',
            'relation_id.number'        => '关联id必须是数字',
            'type.require'              => '类型不能为空',
            'type.number'               => '类型必须是数字',
            'relation_type.require'     => '关联类型不能为空',
            'relation_type.number'      => '关联类型必须是数字',
        ],
    ],
    //获取地址详情
    'get_address' => [
        'rule' => [
            'address_id' => 'require|number',
        ],
        'msg'  => [
            'address_id.require'       => '收货地址id不能为空',
            'address_id.num'           => '收货地址id必须为数字',
        ],
    ],
    //球币记录列表
    'coin_record_list' => [
        'rule' => [
            'type'            => 'require|number',
            'page'            => 'require|number',
        ],
        'msg'  => [
            'type.require'       => '球币变动类型不能为空',
            'type.number'        => '球币变动类型必须为数字',
            'page.require'       => '分页页码不能为空',
            'page.number'        => '分页页码必须是数字',
        ],
    ],
];
